//
//  ProgressCell.swift
//  KaMengApplication
//
//  Created by DUONIU_MAC on 2019/1/3.
//  Copyright © 2019年 DUONIU_MAC. All rights reserved.
//

import UIKit

class ProgressCell: UICollectionViewCell {
    
    let imageView = UIImageView()
    let titleLabel = UILabel()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.contentView.addSubview(imageView)
        
        titleLabel.font = UIFont.systemFont(ofSize: RATIO(maxNum: 14))
        self.contentView.addSubview(titleLabel)
        
        imageView.snp.makeConstraints { (make) in
            make.left.equalToSuperview().offset(RATIO(maxNum: 20))
            make.width.height.equalTo(RATIO_H(maxNum: 25))
            make.centerY.equalToSuperview()
        }
        
        titleLabel.snp.makeConstraints { (make) in
            make.centerY.equalTo(imageView)
            make.left.equalTo(imageView.snp.right).offset(RATIO(maxNum: 10))
            make.right.equalToSuperview()
            make.height.greaterThanOrEqualTo(10)
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
